package com.tinem.platform.module.starter.jpa.entity.pay;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author fzh
 * @version v1
 * @program: platform
 * @className OrderPay
 * @description 订单支付记录表
 * @site
 * @company
 * @create 2021-11-5
 */
@Data
@Entity
@ToString
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Table(name="t_order_pay")
@ApiModel("订单支付记录表")
public class OrderPay implements Serializable,Cloneable{
    @Id
    @Column(name = "c_id",nullable=true)
    @ApiModelProperty(name = "id", value = "ID",required = true)
    private String id;

    @Column(name = "c_pay_channel_order_id",nullable=true)
    @ApiModelProperty(name = "payChannelOrderId", value = "支付渠道订单id",required = true)
    private String payChannelOrderId;

    @Column(name = "c_order_id",nullable=true)
    @ApiModelProperty(name = "orderId", value = "订单id",required = true)
    private String orderId;

    @Column(name = "c_pay_channel",nullable=true)
    @ApiModelProperty(name = "payChannel", value = "支付渠道id",required = true)
    private String payChannel;

    @Column(name = "c_request_params",nullable=true)
    @ApiModelProperty(name = "requestParams", value = "支付渠道请求参数",required = true)
    private String requestParams;

    @Column(name = "c_response",nullable=true)
    @ApiModelProperty(name = "response", value = "支付渠道返回值",required = true)
    private String response;

    @Column(name = "c_channel_status",nullable=true)
    @ApiModelProperty(name = "channelStatus", value = "渠道状态",required = true)
    private String channelStatus;

    @Column(name = "c_channel_message",nullable=true)
    @ApiModelProperty(name = "channelMessage", value = "渠道消息",required = true)
    private String channelMessage;

    @Version
    @Column(name = "c_revision",nullable=true)
    @ApiModelProperty(name = "revision", value = "乐观锁",required = false)
    private Integer revision;

    @Column(name = "c_created_by",nullable=true)
    @ApiModelProperty(name = "createdBy", value = "创建人",required = false)
    private String createdBy;

    @Column(name = "c_created_time",nullable=true,insertable = false,updatable = false)
    @ApiModelProperty(name = "createdTime", value = "创建时间",required = false)
    private Date createdTime;

    @Column(name = "c_updated_by",nullable=true)
    @ApiModelProperty(name = "updatedBy", value = "更新人",required = false)
    private String updatedBy;

    @Column(name = "c_updated_time",nullable=true,insertable = false,updatable = false)
    @ApiModelProperty(name = "updatedTime", value = "更新时间",required = false)
    private Date updatedTime;

    @Column(name = "c_skip_to3d_url",nullable=true)
    @ApiModelProperty(name = "skipTo3dUrl", value = "skipto3durl 暂时只有wantspay使用",required = false)
    private String skipTo3dUrl;

    @Transient
    private Order order;

}